<template>
  <div>
    <titleTop :titleTxet="titleTxet"></titleTop>
    <div class="container">
      <textarea
        placeholder="请填写你的意见和建议"
        v-model="content"
        class="textarea font_28 c_28"
      ></textarea>
    </div>
    <div class="container">
      <input
        type="text"
        placeholder="请填写手机号码或邮箱"
        v-model="contact_way"
        class="melibo font_28 c_28 p_l20 p_r20"
      >
    </div>
    <div class="font_28 c_8c text">
      <div class="m_d40">
        <span>或者通过以下方式联系我们：</span>
      </div>
      <div class="m_d40">
        <span>微信公众号：</span><span>大集舞会</span>
      </div>
      <div class="m_d40">
        <span>邮箱：</span><span>125648@163.com</span>
      </div>
    </div>

    <div class="sub-btn t_center font_36 c_ff">
      <span @click="tijiao()">提交</span>
    </div>
  </div>
</template>
<script>
import titleTop from "../../com/title";
import * as common from "../../../api/common.js";
import {Dialog} from 'vant';
export default {
  components: { titleTop },
  data() {
    return {
      titleTxet: {
        titleName: "意见反馈",
        IsBool: true,
        IsShare: false
      },
      content: "",
      contact_way: ""
    };
  },
  mounted(){
    mui.back = function() {
      window.history.go(-1);
    }
  },
  methods: {
    tijiao(){
      let parms = {
        user_id:this.$store.state.user_id,
        content:this.content,
        contact_way:this.contact_way
      };
      common.submitFeedback(parms).then(res=>{
        console.log(res);
        if (res.status==200) {
          Dialog.alert({
            message: res.msg
          }).then(()=>{
            history.go(-1);
          });
        }else{
          Dialog.alert({
            message: res.msg
          })
        }
      })
    }
  }
};
</script>

<style scoped>
.textarea {
  display: block;
  width: 570px;
  height: 347px;
  margin: 0 auto;
  margin-top: 52px;
  padding: 15px;
  box-sizing: border-box;
  border: 2px solid #dcdcdc;
}
.melibo {
  display: block;
  width: 570px;
  height: 70px;
  line-height: 70px;
  margin: 52px auto 50px;
  border: 1px solid #cdcdcd;
  box-sizing: border-box;
}
.text{
 width: 570px;
 margin: 0 auto;
}

.sub-btn {
  width: 400px;
  height: 80px;
  line-height: 80px;
  margin: 0 auto;
  background: #884ca4;
  border-radius: 10px;
  margin-top: 295px;
}
.sub-btn span{
  color: #fff;
}
</style>


